﻿@{
	ViewBag.Title = "Index";
	Layout = "~/Views/Shared/_Layout.cshtml";
}
<div id="wrap_flag">
	<div id="toolbar_wrapper" class="clearfix">
		<h4>工房实时工作状态展示</h4>
	</div>
	<div id="altContent">
	</div>
</div>


@section inlinestyle {
#toolbar_wrapper { background: #ccc; }
#toolbar_wrapper h4 { float: left; line-height: 36px; margin: auto;}
#toolbar_wrapper .btn-group { margin: 3px 5px 0 0; float: right; }
}

@section links {
	<link type="text/css" rel="stylesheet" href="~/Content/jqueryui/css/jquery-ui-1.9.0.custom.css" />
}

@section scripts {
	<script type="text/javascript" src="~/Content/common/js/swfobject.js"></script>
	<script type="text/javascript" src="~/Content/jqueryui/js/jquery-ui-1.9.0.custom.min.js"></script>
	<script type="text/javascript">
		var randomnumber=Math.floor(Math.random()*10000);
		var flashvars = {
			"isInEditMode" : "false"
		};
		var params = {
			menu: "false",
			scale: "noScale",
			allowFullscreen: "true",
			allowScriptAccess: "always",
			bgcolor: "",
			wmode: "opaque" // can cause issues with FP settings & webcam
		};
		var attributes = {
			id:"tcmsmap"
		};
		swfobject.embedSWF(
			"@Url.Content("~/Content/swf/tcmsmap.swf")?" + randomnumber, 
			"altContent", "100%", "100%", "10.0.0", 
			"expressInstall.swf", 
			flashvars, params, attributes);

		function loaded() {
			var raw = '@Html.Raw(ViewBag.ShopFloors)';
			var me = $('#tcmsmap')[0].loadWorkShops(raw);
		}

		function changeSWFHeight(height) {
			$('#tcmsmap').height(height);
		}


	</script>
}
